<!DOCTYPE html>
<html lang="en-us">
  <head>
    
    <script type="application/ld+json">

{
  "@context": "https://schema.org",
  "@type": "BlogPosting",
  "headline": "21th_Feb_algorithm_training",
  
  "datePublished": "2022-02-21T12:50:25+08:00",
  "dateModified": "2022-02-21T12:50:25+08:00",
  "author": {
    "@type": "Person",
    "name": "Zhang Gaojie",
    
    "image": "https://zgjoget.gitee.io/img/avatar.jpg"
    
  },
  "mainEntityOfPage": { 
    "@type": "WebPage",
    "@id": "https:\/\/zgjoget.gitee.io\/2022\/02\/21th_feb_algorithm_training\/" 
  },
  "publisher": {
    "@type": "Organization",
    "name": "Zhang Gaojie",
    
    "logo": {
      "@type": "ImageObject",
      "url": "https://zgjoget.gitee.io/img/avatar.jpg"
    }
    
  },
  "description": "由于这几天忙着做毕业设计，导致前两天的算法训练没有能够完成，那么今天就把前几天没做的题补上，然后再做个小总结\n",
  "keywords": []
}

</script>
    <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="generator" content="Hugo 0.92.2 with theme Tranquilpeak 0.5.3-BETA">
<meta name="author" content="Zhang Gaojie">
<meta name="keywords" content="">
<meta name="description" content="由于这几天忙着做毕业设计，导致前两天的算法训练没有能够完成，那么今天就把前几天没做的题补上，然后再做个小总结">


<meta property="og:description" content="由于这几天忙着做毕业设计，导致前两天的算法训练没有能够完成，那么今天就把前几天没做的题补上，然后再做个小总结">
<meta property="og:type" content="article">
<meta property="og:title" content="21th_Feb_algorithm_training">
<meta name="twitter:title" content="21th_Feb_algorithm_training">
<meta property="og:url" content="https://zgjoget.gitee.io/2022/02/21th_feb_algorithm_training/">
<meta property="twitter:url" content="https://zgjoget.gitee.io/2022/02/21th_feb_algorithm_training/">
<meta property="og:site_name" content="Zhang Gaojie">
<meta property="og:description" content="由于这几天忙着做毕业设计，导致前两天的算法训练没有能够完成，那么今天就把前几天没做的题补上，然后再做个小总结">
<meta name="twitter:description" content="由于这几天忙着做毕业设计，导致前两天的算法训练没有能够完成，那么今天就把前几天没做的题补上，然后再做个小总结">
<meta property="og:locale" content="en-us">

  
    <meta property="article:published_time" content="2022-02-21T12:50:25">
  
  
    <meta property="article:modified_time" content="2022-02-21T12:50:25">
  
  
  
  


<meta name="twitter:card" content="summary">







  <meta property="og:image" content="https://zgjoget.gitee.io/img/avatar.jpg">
  <meta property="twitter:image" content="https://zgjoget.gitee.io/img/avatar.jpg">






    <title>21th_Feb_algorithm_training</title>

    <link rel="icon" href="https://zgjoget.gitee.io/favicon.png">
    

    

    <link rel="canonical" href="https://zgjoget.gitee.io/2022/02/21th_feb_algorithm_training/">

    
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css" integrity="sha512-iBBXm8fW90+nuLcSKlbmrPcLa0OT92xO1BIsZ+ywDWZCvqsWgccV3gFoRBv0z+8dLJgyAHIhR35VZc2oM/gI1w==" crossorigin="anonymous" referrerpolicy="no-referrer" />
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/fancybox/3.5.7/jquery.fancybox.min.css" integrity="sha512-H9jrZiiopUdsLpg94A333EfumgUBpO9MdbxStdeITo+KEIMaNfHNvwyjjDJb+ERPaRS6DpyRlKbvPUasNItRyw==" crossorigin="anonymous" referrerpolicy="no-referrer" />
    
    
    
    <link rel="stylesheet" href="https://zgjoget.gitee.io/css/style-h6ccsoet3mzkbb0wngshlfbaweimexgqcxj0h5hu4h82olsdzz6wmqdkajm.min.css" />
    
    

    
      
    
    
  </head>

  <body>
    <div id="blog">
      <header id="header" data-behavior="4">
  <i id="btn-open-sidebar" class="fa fa-lg fa-bars"></i>
  <div class="header-title">
    <a class="header-title-link" href="https://zgjoget.gitee.io/" aria-label="Go to homepage">Zhang Gaojie</a>
  </div>
  
    
      <a class="header-right-picture "
         href="https://zgjoget.gitee.io/#about" aria-label="Open the link: /#about">
    
    
    
      
        <img class="header-picture" src="https://zgjoget.gitee.io/img/avatar.jpg" alt="Author&#39;s picture" />
      
    
    </a>
  
</header>

      <nav id="sidebar" data-behavior="4">
  <div class="sidebar-container">
    
      <div class="sidebar-profile">
        <a href="https://zgjoget.gitee.io/#about" aria-label="Read more about the author">
          <img class="sidebar-profile-picture" src="https://zgjoget.gitee.io/img/avatar.jpg" alt="Author&#39;s picture" />
        </a>
        <h4 class="sidebar-profile-name">Zhang Gaojie</h4>
        
          <h5 class="sidebar-profile-bio">A Computer-science and Cyber-security novice</h5>
        
      </div>
    
    <ul class="sidebar-buttons">
      
  <li class="sidebar-button">
    
      <a class="sidebar-button-link " href="https://zgjoget.gitee.io/" title="Home">
    
      <i class="sidebar-button-icon fas fa-lg fa-home" aria-hidden="true"></i>
      
      <span class="sidebar-button-desc">Home</span>
    </a>
  </li>

  <li class="sidebar-button">
    
      <a class="sidebar-button-link " href="https://zgjoget.gitee.io/categories" title="Categories">
    
      <i class="sidebar-button-icon fas fa-lg fa-bookmark" aria-hidden="true"></i>
      
      <span class="sidebar-button-desc">Categories</span>
    </a>
  </li>

  <li class="sidebar-button">
    
      <a class="sidebar-button-link " href="https://zgjoget.gitee.io/tags" title="Tags">
    
      <i class="sidebar-button-icon fas fa-lg fa-tags" aria-hidden="true"></i>
      
      <span class="sidebar-button-desc">Tags</span>
    </a>
  </li>

  <li class="sidebar-button">
    
      <a class="sidebar-button-link " href="https://zgjoget.gitee.io/archives" title="Archives">
    
      <i class="sidebar-button-icon fas fa-lg fa-archive" aria-hidden="true"></i>
      
      <span class="sidebar-button-desc">Archives</span>
    </a>
  </li>

  <li class="sidebar-button">
    
      <a class="sidebar-button-link " href="https://zgjoget.gitee.io/#about" title="About">
    
      <i class="sidebar-button-icon fas fa-lg fa-question" aria-hidden="true"></i>
      
      <span class="sidebar-button-desc">About</span>
    </a>
  </li>


    </ul>
    <ul class="sidebar-buttons">
      
  <li class="sidebar-button">
    
      <a class="sidebar-button-link " href="https://github.com/zgjoget9" target="_blank" rel="noopener" title="GitHub">
    
      <i class="sidebar-button-icon fab fa-lg fa-github" aria-hidden="true"></i>
      
      <span class="sidebar-button-desc">GitHub</span>
    </a>
  </li>

  <li class="sidebar-button">
    
      <a class="sidebar-button-link " href="https://stackoverflow.com/users/18013715/jack-zhang" target="_blank" rel="noopener" title="Stack Overflow">
    
      <i class="sidebar-button-icon fab fa-lg fa-stack-overflow" aria-hidden="true"></i>
      
      <span class="sidebar-button-desc">Stack Overflow</span>
    </a>
  </li>


    </ul>
    <ul class="sidebar-buttons">
      

    </ul>
  </div>
</nav>

      

      <div id="main" data-behavior="4"
        class="
               hasCoverMetaIn
               ">
        <article class="post" id="top">
          
          
            <div class="post-header main-content-wrap text-left">
  
    <h1 class="post-title">
      21th_Feb_algorithm_training
    </h1>
  
  
  <div class="postShorten-meta post-meta">
    
      <time datetime="2022-02-21T12:50:25&#43;08:00">
        
  February 21, 2022

      </time>
    
    
  </div>

</div>
          
          <div class="post-content markdown">
            <div class="main-content-wrap">
              <p>由于这几天忙着做毕业设计，导致前两天的算法训练没有能够完成，那么今天就把前几天没做的题补上，然后再做个小总结</p>
<ul>
<li>
<ol start="1576">
<li><a href="https://leetcode-cn.com/problems/replace-all-s-to-avoid-consecutive-repeating-characters/">替换所有的问号</a><strong>easy</strong></li>
</ol>
</li>
</ul>
<pre tabindex="0"><code>class Solution {
public:
    string modifyString(string s) {
        if (s[0] == '?')s[0] = 'a';
        for (int i = 1; i &lt; s.size(); i++) {
            if (s[i] == '?') {
                for (char tmp = 'a'; tmp &lt;= 'c'; tmp++) {
                    if (s[i - 1] != tmp) {
                        s[i] = tmp;
                        break;
                    }
                }
            }
            else if (s[i] == s[i - 1]) {
                s[i - 1] = ((s[i - 1]- 'a' + 1) % 26)+'a';
                if(i-2&gt;=0&amp;&amp;s[i-1]==s[i-2])s[i - 1] = ((s[i - 1]- 'a' + 1) % 26)+'a';
            }
            
            else continue;
        }
        return s;
    }
};
</code></pre><p><img src="https://zgjoget9.github.io/img/2_10_algorithm_1.png" alt="pic1"></p>
<ul>
<li>
<ol start="1405">
<li><a href="https://leetcode-cn.com/problems/longest-happy-string/">最长快乐字符串</a><strong>medium</strong></li>
</ol>
</li>
</ul>
<p>优先队列</p>
<pre tabindex="0"><code>class Solution {
public:
    string longestDiverseString(int a, int b, int c) {
        priority_queue&lt;pair&lt;int,int&gt;&gt;pq;
        if(a)pq.push({a,0});
        if(b)pq.push({b,1});
        if(c)pq.push({c,2});    
        string ans;
        while(!pq.empty()){
            int sz=ans.size();
            pair&lt;int,int&gt;tmp=pq.top();
            pq.pop();
            if(sz&gt;=2&amp;&amp;tmp.second+'a'==ans[sz-1]&amp;&amp;tmp.second+'a'==ans[sz-2]){
                if(pq.empty())break;
                pair&lt;int,int&gt;change=pq.top();
                pq.pop();
                pq.push(tmp);
                ans+=change.second+'a';
                change.first-=1;
                if(change.first!=0)pq.push(change);
            }
            else{
                ans+='a'+tmp.second;
                tmp.first-=1;
                if(tmp.first!=0)pq.push(tmp);
            }
        }
        return ans;

    }
};
</code></pre><p><img src="https://zgjoget9.github.io/img/2_10_algorithm_2.png" alt="pic2"></p>
<ul>
<li>
<ol start="1219">
<li><a href="https://leetcode-cn.com/problems/path-with-maximum-gold/">黄金矿工</a><strong>medium</strong></li>
</ol>
</li>
</ul>
<pre tabindex="0"><code>
</code></pre><p><img src="https://zgjoget9.github.io/img/2_10_algorithm_3.png" alt="pic3"></p>
<ul>
<li>
<ol start="5">
<li><a href="https://leetcode-cn.com/problems/longest-palindromic-substring/">最长回文子串</a><strong>medium</strong></li>
</ol>
</li>
</ul>
<p><img src="https://pic.leetcode-cn.com/1645416057-skPaLs-%E6%88%AA%E5%B1%8F2022-02-21%2012.00.28.png" alt="截屏2022-02-21 12.00.28.png"></p>
<p>从头到尾扫一遍字符串，如果当前位置到s的末尾的距离*2小于当前计算的tmp_max的长度就提前结束遍历</p>
<p>(因为后面的字符加一起也没已经算出来的长，所以就不用算了)</p>
<p>思考一下其实回文总共就只有两种情况</p>
<ul>
<li>以单个字符对称</li>
</ul>
<p>如：cbabc以中间的a对称</p>
<ul>
<li>以两个字符对称</li>
</ul>
<p>如：cbaabc以中间的aa对称</p>
<p>第一种情况只需要一直判断s[location-i]==s[location+i]</p>
<p>第二种情况在遍历字符串的时候顺便判断一下当前字符与前面一个字符是否相同。</p>
<p>相同的话就需要判断s[location-i-1]==s[location+i]到结束</p>
<p><strong>要时刻注意不要越界</strong></p>
<p>在当前location计算结束(即一次循环结束)时将当前location计算出的tmp与目前为止计算出的最长字符串比较长度，
如果当前location计算的长度更长就更新目前为止计算出的最长字符串</p>
<pre tabindex="0"><code>class Solution {
public:
    string longestPalindrome(string s) {
        int sz=s.size();
        string tmp_max;
        if(sz==1)return s;
        if(sz==2){
            if(s[0]==s[1])return s;
            else return s.substr(0,1);
        }
        int left=1;
        string tmp;

        while(left&lt;sz){
            if((sz-left)*2&lt;tmp_max.size())break;
            int i=0;
            while(s[left-i]==s[left+i]){
                i++;
                if(left-i&lt;0||left+i&gt;=sz)break;
            }
            i--;
            tmp=s.substr(left-i,2*i+1);
            if(tmp.size()&gt;tmp_max.size())tmp_max=tmp;
            
            if(s[left]==s[left-1]){
                int j=0;
                while(s[left-j-1]==s[left+j]){
                    j++;
                    if(left-j-1&lt;0||left+j&gt;=sz)break;
                }
                j--;
                tmp=s.substr(left-1-j,2*j+2);
                if(tmp.size()&gt;tmp_max.size())tmp_max=tmp;
            }
            left++;
        }

        return tmp_max;
    }

};
</code></pre><p><img src="https://zgjoget9.github.io/img/2_10_algorithm_4.png" alt="pic4"></p>
<ul>
<li>
<ol start="22">
<li><a href="https://leetcode-cn.com/problems/generate-parentheses/">括号生成</a><strong>medium</strong></li>
</ol>
</li>
</ul>
<pre tabindex="0"><code>
</code></pre><p><img src="https://zgjoget9.github.io/img/2_10_algorithm_5.png" alt="pic5"></p>
<ul>
<li>
<ol start="1001">
<li><a href="https://leetcode-cn.com/problems/grid-illumination/">网格照明</a><strong>hard</strong></li>
</ol>
</li>
</ul>
<pre tabindex="0"><code>
</code></pre><p><img src="https://zgjoget9.github.io/img/2_10_algorithm_6.png" alt="pic6"></p>
<ul>
<li>剑指 Offer 12. <a href="https://leetcode-cn.com/problems/ju-zhen-zhong-de-lu-jing-lcof/">矩阵中的路径</a><strong>medium</strong></li>
</ul>
<pre tabindex="0"><code>
</code></pre><p><img src="https://zgjoget9.github.io/img/2_10_algorithm_7.png" alt="pic7"></p>
<ul>
<li>剑指 Offer 45. <a href="https://leetcode-cn.com/problems/ba-shu-zu-pai-cheng-zui-xiao-de-shu-lcof/">把数组排成最小的数</a><strong>medium</strong></li>
</ul>
<pre tabindex="0"><code>
</code></pre><p><img src="https://zgjoget9.github.io/img/2_10_algorithm_8.png" alt="pic8"></p>
<ul>
<li>剑指 Offer 48. <a href="https://leetcode-cn.com/problems/zui-chang-bu-han-zhong-fu-zi-fu-de-zi-zi-fu-chuan-lcof/">最长不含重复字符的子字符串</a><strong>medium</strong></li>
</ul>
<pre tabindex="0"><code>class Solution {
public:
    int lengthOfLongestSubstring(string s) {
        int tmp_max=0;
        for(int i=0;i&lt;s.size();i++){
            if(s.size()-i&lt;=tmp_max)break;
            unordered_map&lt;char,int&gt;mp;
            int count=0;
            for(int j=i;j&lt;s.size();j++){
                mp[s[j]]++;
                if(mp[s[j]]&gt;1)break;
                else count++;
            }
            if(count&gt;tmp_max)tmp_max=count;
        }
        return tmp_max;
    }
};
</code></pre><p><img src="https://zgjoget9.github.io/img/21th_Feb_algorithm_9.png" alt="pic9"></p>
<ul>
<li>剑指 Offer 46. <a href="https://leetcode-cn.com/problems/ba-shu-zi-fan-yi-cheng-zi-fu-chuan-lcof/">把数字翻译成字符串</a><strong>medium</strong></li>
</ul>
<p>这题类似于青蛙跳台阶那题，只是在+2的时候要进行一个判断</p>
<pre tabindex="0"><code>
</code></pre><p><img src="https://zgjoget9.github.io/img/2_10_algorithm_10.png" alt="pic10"></p>
<ul>
<li>
<ol start="78">
<li><a href="https://leetcode-cn.com/problems/subsets/">子集</a><strong>medium</strong></li>
</ol>
</li>
</ul>
<pre tabindex="0"><code>
</code></pre><p><img src="https://zgjoget9.github.io/img/2_10_algorithm_11.png" alt="pic11"></p>
<ul>
<li>
<ol start="23">
<li><a href="https://leetcode-cn.com/problems/merge-k-sorted-lists/">合并K个升序链表</a><strong>hard</strong></li>
</ol>
</li>
</ul>
<pre tabindex="0"><code>/**
 * Definition for singly-linked list.
 * struct ListNode {
 *     int val;
 *     ListNode *next;
 *     ListNode() : val(0), next(nullptr) {}
 *     ListNode(int x) : val(x), next(nullptr) {}
 *     ListNode(int x, ListNode *next) : val(x), next(next) {}
 * };
 */
class Solution {
public:
    ListNode* mergeKLists(vector&lt;ListNode*&gt;&amp; lists) {
        int len = lists.size();
        if(len==0)return NULL;
        ListNode* p[len];
        for(int i=0;i&lt;len;i++){
            p[i]=lists[i];
        }
        ListNode *headnode=new ListNode();
        ListNode *t=headnode;

        while(1){
            int remain=len;
            int min=INT_MAX,location;
            for(int i=0;i&lt;len;i++){

                if(p[i]==NULL){
                    remain--;
                    continue;
                }

                else if(p[i]-&gt;val&lt;min){
                    min=p[i]-&gt;val;
                    location=i;
                }

            }
            if(remain==0)return headnode-&gt;next;
            ListNode *node=new ListNode(p[location]-&gt;val);
            p[location]=p[location]-&gt;next;
            t-&gt;next=node;
            t=t-&gt;next;
        }
        return headnode-&gt;next;
    }
};
</code></pre><p><img src="https://zgjoget9.github.io/img/2_10_algorithm_12.png" alt="pic12"></p>
              


            </div>
          </div>
          <div id="post-footer" class="post-footer main-content-wrap">
            
              
            
            
<div class="post-actions-wrap">
  <nav >
    <ul class="post-actions post-action-nav">
      
        <li class="post-action">
          
            <a class="post-action-btn btn btn--default tooltip--top" href="https://zgjoget.gitee.io/2022/03/os_interview/" data-tooltip="Os_interview" aria-label="NEXT: Os_interview">
          
              <i class="fa fa-angle-left"></i>
              <span class="hide-xs hide-sm text-small icon-ml">NEXT</span>
            </a>
        </li>
        <li class="post-action">
          
            <a class="post-action-btn btn btn--default tooltip--top" href="https://zgjoget.gitee.io/2022/02/double_week_contest/" data-tooltip="Double_week_contest" aria-label="PREVIOUS: Double_week_contest">
          
              <span class="hide-xs hide-sm text-small icon-mr">PREVIOUS</span>
              <i class="fa fa-angle-right"></i>
            </a>
        </li>
      
    </ul>
  </nav>
<ul class="post-actions post-action-share" >
  
    <li class="post-action hide-lg hide-md hide-sm">
      <a class="post-action-btn btn btn--default btn-open-shareoptions" href="#btn-open-shareoptions" aria-label="Share this post">
        <i class="fa fa-share-alt" aria-hidden="true"></i>
      </a>
    </li>
    
      <li class="post-action hide-xs">
        <a class="post-action-btn btn btn--default" target="new" href="https://www.facebook.com/sharer/sharer.php?u=https://zgjoget.gitee.io/2022/02/21th_feb_algorithm_training/" title="Share on Facebook" aria-label="Share on Facebook">
          <i class="fab fa-facebook-square" aria-hidden="true"></i>
        </a>
      </li>
    
      <li class="post-action hide-xs">
        <a class="post-action-btn btn btn--default" target="new" href="https://twitter.com/intent/tweet?text=https://zgjoget.gitee.io/2022/02/21th_feb_algorithm_training/" title="Share on Twitter" aria-label="Share on Twitter">
          <i class="fab fa-twitter" aria-hidden="true"></i>
        </a>
      </li>
    
      <li class="post-action hide-xs">
        <a class="post-action-btn btn btn--default" target="new" href="https://www.linkedin.com/sharing/share-offsite/?url=https://zgjoget.gitee.io/2022/02/21th_feb_algorithm_training/" title="Share on Linkedin" aria-label="Share on Linkedin">
          <i class="fab fa-linkedin" aria-hidden="true"></i>
        </a>
      </li>
    
  
  
    <li class="post-action">
      <a class="post-action-btn btn btn--default" href="#disqus_thread" aria-label="Leave a comment">
        <i class="far fa-comment"></i>
      </a>
    </li>
  
  <li class="post-action">
    
      <a class="post-action-btn btn btn--default" href="#top" aria-label="Back to top">
      <i class="fa fa-arrow-up" aria-hidden="true"></i>
    
    </a>
  </li>
</ul>
</div>


            
  
    <div id="disqus_thread">
      <noscript>Please enable JavaScript to view the comments powered by Disqus.</noscript>
    </div>
    <script type="text/javascript">
      var disqus_config = function() {
        this.page.url = 'https:\/\/zgjoget.gitee.io\/2022\/02\/21th_feb_algorithm_training\/';
        
          this.page.identifier = '\/2022\/02\/21th_feb_algorithm_training\/'
        
      };
      (function() {
        
        
        if (["localhost", "127.0.0.1"].indexOf(window.location.hostname) != -1) {
          document.getElementById('disqus_thread').innerHTML = 'Disqus comments not available by default when the website is previewed locally.';
          return;
        }
        var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
        var disqus_shortname = 'zgjoget9-github-io';
        dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
        (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
      })();
    </script>
  


          </div>
        </article>
        <footer id="footer" class="main-content-wrap">
  <span class="copyrights">
    &copy; 2022 Zhang Gaojie. All Rights Reserved
  </span>
</footer>

      </div>
      <div id="bottom-bar" class="post-bottom-bar" data-behavior="4">
        
<div class="post-actions-wrap">
  <nav >
    <ul class="post-actions post-action-nav">
      
        <li class="post-action">
          
            <a class="post-action-btn btn btn--default tooltip--top" href="https://zgjoget.gitee.io/2022/03/os_interview/" data-tooltip="Os_interview" aria-label="NEXT: Os_interview">
          
              <i class="fa fa-angle-left"></i>
              <span class="hide-xs hide-sm text-small icon-ml">NEXT</span>
            </a>
        </li>
        <li class="post-action">
          
            <a class="post-action-btn btn btn--default tooltip--top" href="https://zgjoget.gitee.io/2022/02/double_week_contest/" data-tooltip="Double_week_contest" aria-label="PREVIOUS: Double_week_contest">
          
              <span class="hide-xs hide-sm text-small icon-mr">PREVIOUS</span>
              <i class="fa fa-angle-right"></i>
            </a>
        </li>
      
    </ul>
  </nav>
<ul class="post-actions post-action-share" >
  
    <li class="post-action hide-lg hide-md hide-sm">
      <a class="post-action-btn btn btn--default btn-open-shareoptions" href="#btn-open-shareoptions" aria-label="Share this post">
        <i class="fa fa-share-alt" aria-hidden="true"></i>
      </a>
    </li>
    
      <li class="post-action hide-xs">
        <a class="post-action-btn btn btn--default" target="new" href="https://www.facebook.com/sharer/sharer.php?u=https://zgjoget.gitee.io/2022/02/21th_feb_algorithm_training/" title="Share on Facebook" aria-label="Share on Facebook">
          <i class="fab fa-facebook-square" aria-hidden="true"></i>
        </a>
      </li>
    
      <li class="post-action hide-xs">
        <a class="post-action-btn btn btn--default" target="new" href="https://twitter.com/intent/tweet?text=https://zgjoget.gitee.io/2022/02/21th_feb_algorithm_training/" title="Share on Twitter" aria-label="Share on Twitter">
          <i class="fab fa-twitter" aria-hidden="true"></i>
        </a>
      </li>
    
      <li class="post-action hide-xs">
        <a class="post-action-btn btn btn--default" target="new" href="https://www.linkedin.com/sharing/share-offsite/?url=https://zgjoget.gitee.io/2022/02/21th_feb_algorithm_training/" title="Share on Linkedin" aria-label="Share on Linkedin">
          <i class="fab fa-linkedin" aria-hidden="true"></i>
        </a>
      </li>
    
  
  
    <li class="post-action">
      <a class="post-action-btn btn btn--default" href="#disqus_thread" aria-label="Leave a comment">
        <i class="far fa-comment"></i>
      </a>
    </li>
  
  <li class="post-action">
    
      <a class="post-action-btn btn btn--default" href="#top" aria-label="Back to top">
      <i class="fa fa-arrow-up" aria-hidden="true"></i>
    
    </a>
  </li>
</ul>
</div>


      </div>
      
<div id="share-options-bar" class="share-options-bar" data-behavior="4">
  <i id="btn-close-shareoptions" class="fa fa-times"></i>
  <ul class="share-options">
    
      <li class="share-option">
        <a class="share-option-btn" target="new" href="https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fzgjoget.gitee.io%2F2022%2F02%2F21th_feb_algorithm_training%2F" aria-label="Share on Facebook">
          <i class="fab fa-facebook-square" aria-hidden="true"></i><span>Share on Facebook</span>
        </a>
      </li>
    
      <li class="share-option">
        <a class="share-option-btn" target="new" href="https://twitter.com/intent/tweet?text=https%3A%2F%2Fzgjoget.gitee.io%2F2022%2F02%2F21th_feb_algorithm_training%2F" aria-label="Share on Twitter">
          <i class="fab fa-twitter" aria-hidden="true"></i><span>Share on Twitter</span>
        </a>
      </li>
    
      <li class="share-option">
        <a class="share-option-btn" target="new" href="https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fzgjoget.gitee.io%2F2022%2F02%2F21th_feb_algorithm_training%2F" aria-label="Share on Linkedin">
          <i class="fab fa-linkedin" aria-hidden="true"></i><span>Share on Linkedin</span>
        </a>
      </li>
    
  </ul>
</div>
<div id="share-options-mask" class="share-options-mask"></div>


    </div>
    
    <div id="about">
  <div id="about-card">
    <div id="about-btn-close">
      <i class="fa fa-times"></i>
    </div>
    
      <img id="about-card-picture" src="https://zgjoget.gitee.io/img/avatar.jpg" alt="Author&#39;s picture" />
    
    <h4 id="about-card-name">Zhang Gaojie</h4>
    
      <div id="about-card-bio">A Computer-science and Cyber-security novice</div>
    
    
      <div id="about-card-job">
        <i class="fa fa-briefcase"></i>
        <br/>
        Huazhong University of Science and Technology
      </div>
    
    
      <div id="about-card-location">
        <i class="fa fa-map-marker-alt"></i>
        <br/>
        Wuhan, China
      </div>
    
  </div>
</div>

    

    
  
    
      <div id="cover" style="background-image:url('https://zgjoget.gitee.io/images/cover.jpg');"></div>
    
  


    
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js" integrity="sha512-894YE6QWD5I59HgZOGReFYm4dnWc1Qt5NtvYSaNcOP+u1T9qYdvdihz0PPSiiqn/+/3e7Jo4EaG7TubfWGUrMQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>

  <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.1.0/highlight.min.js" integrity="sha512-z+/WWfyD5tccCukM4VvONpEtLmbAm5LDu7eKiyMQJ9m7OfPEDL7gENyDRL3Yfe8XAuGsS2fS4xSMnl6d30kqGQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>

<script src="https://cdnjs.cloudflare.com/ajax/libs/fancybox/3.5.7/jquery.fancybox.min.js" integrity="sha512-uURl+ZXMBrF4AwGaWmEetzrd+J5/8NRkWAvJx5sbPSSuOb0bZLqf+tOzniObO00BjHa/dD7gub9oCGMLPQHtQA==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>


<script src="https://zgjoget.gitee.io/js/script-yqzy9wdlzix4lbbwdnzvwx3egsne77earqmn73v9uno8aupuph8wfguccut.min.js"></script>


  
    <script async crossorigin="anonymous" defer integrity="sha512-gE8KAQyFIzV1C9+GZ8TKJHZS2s+n7EjNtC+IMRn1l5+WYJTHOODUM6JSjZhFhqXmc7bG8Av6XXpckA4tYhflnw==" src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.1.0/languages/apache.min.js"></script>
  

  
    <script async crossorigin="anonymous" defer integrity="sha512-EWROca+bote+7Oaaar1F6y74iZj1r1F9rm/ly7o+/FwJopbBaWtsFDmaKoZDd3QiGU2pGacBirHJNivmGLYrow==" src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.1.0/languages/go.min.js"></script>
  

  
    <script async crossorigin="anonymous" defer integrity="sha512-GDVzAn0wpx1yVtQsRWmFc6PhJiLBPdUic+h4GWgljBh904O3JU10fk9EKNpVyIoPqkFn54rgL2QBG4BmUTMpiQ==" src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.1.0/languages/http.min.js"></script>
  

  
    <script async crossorigin="anonymous" defer integrity="sha512-UgZlma8NzkrDb/NWgmLIcTrH7i/CSnLLDRFqCSNF5NGPpjKmzyM25qcoXGOup8+cDakKyaiTDd7N4dyH4YT+IA==" src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.1.0/languages/less.min.js"></script>
  

  
    <script async crossorigin="anonymous" defer integrity="sha512-lot9koe73sfXIrUvIPM/UEhuMciN56RPyBdOyZgfO53P2lkWyyXN7J+njcxIIBRV+nVDQeiWtiXg+bLAJZDTfg==" src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.1.0/languages/nginx.min.js"></script>
  

  
    <script async crossorigin="anonymous" defer integrity="sha512-Zd3e7XxHP00TD0Imr0PIfeM0fl0v95kMWuhyAS3Wn1UTSXTkz0OhtRgBAr4JlmADRgiXr4x7lpeUdqaGN8xIog==" src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.1.0/languages/puppet.min.js"></script>
  

  
    <script async crossorigin="anonymous" defer integrity="sha512-qtqDO052iXMSP+5d/aE/jMtL9vIIGvONgTJziC2K/ZIB1yEGa55WVxGE9/08rSQ62EoDifS9SWVGZ7ihSLhzMA==" src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.1.0/languages/scss.min.js"></script>
  

  
    <script async crossorigin="anonymous" defer integrity="sha512-1NmkjnEDnwwwcu28KoQF8vs3oaPFokQHbmbtwGhFfeDsQZtVFI8zW2aE9O8yMYdpdyKV/5blE4pSWw4Z/Sv97w==" src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.1.0/languages/stylus.min.js"></script>
  

  
    <script async crossorigin="anonymous" defer integrity="sha512-B2wSfruPjr8EJL6IIzQr1eAuDwrsfIfccNf/LCEdxELCgC/S/ZMt/Uvk80aD79m7IqOqW+Sw8nbkvha20yZpzg==" src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.1.0/languages/swift.min.js"></script>
  

  
    <script async crossorigin="anonymous" defer integrity="sha512-28oDiQZGKUVN6wQ7PSLPNipOcmkCALXKwOi7bnkyFf8QiMZQxG9EQoy/iiNx6Zxj2cG2SbVa4dXKigQhu7GiFw==" src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.1.0/languages/yaml.min.js"></script>
  


<script>
$(document).ready(function() {
  hljs.configure({ classPrefix: '', useBR: false });
  $('pre.code-highlight > code, pre > code').each(function(i, block) {
    if (!$(this).hasClass('codeblock')) {
      $(this).addClass('codeblock');
    }
    hljs.highlightBlock(block);
  });
});
</script>




    
  </body>
</html>

